1. Field
The present disclosure relates generally to managing energy in a computer system and, in particular, to a method and apparatus for managing energy in a computer system that contains virtual machines. Still more particularly, the present disclosure relates to a method and apparatus for allocating the energy in a computer system to virtual machines.
2. Description of the Related Art
Increasingly, large symmetric multi-processor data processing systems are not being used as single large data processing systems. Instead, these types of data processing systems are being partitioned and used as smaller systems. These systems are also referred to as logical partitioned data processing systems. A logically partitioned functionality within a data processing system allows multiple copies of a single operating system or multiple heterogeneous operating systems to be simultaneously run on a single data processing system platform. A partition, within which an operating system image runs, is assigned a non-overlapping subset of the platform's resources. A partition may also be referred to as a “virtual machine.” The platform allocable resources include one or more architecturally distinct processors and their interrupt management area, regions of system memory, and input/output adapter bus slots. The virtual machine's resources are represented by the platform's firmware to the operating system image.
Each distinct operating system or image of an operating system running within a platform is protected from each other, such that software errors on one virtual machine cannot affect the correct operation of any of the other virtual machines. This protection is provided by allocating a disjointed set of platform resources to be directly managed by each operating system image and by providing mechanisms for ensuring that the various images cannot control any resources that have not been allocated to that image. Furthermore, software errors in control of an operating system's allocated resources are prevented from affecting the resources of any other image. Thus, each image of the operating system, or each different operating system, directly controls a distinct set of allocable resources within the platform.
With respect to hardware resources in a logical partitioned data processing system, these resources are shared disjointly among various virtual machines. These resources may include, for example, input/output adapters, memory, non-volatile random access memory, and hard disk drives. Each virtual machine within a logical partitioned data processing system may be booted and shut down over and over without having to power-cycle the entire data processing system.
A power cap may be set for a machine, for example, a data processing system, that places an upper bound on the energy that the machine consumes over time. Furthermore, the various hardware resources in the data processing system consume different amounts of energy, depending upon the energy requirements of each virtual machine in the data processing system. The amount of energy a virtual machine consumes may depend upon its processing activities.
For example, a virtual machine with active software applications may consume a large amount of energy due to heavy use of the floating point units of the processors of the machine. Furthermore, one virtual machine may run applications that are considered more critical than applications running on another virtual machine. Moreover, some virtual machines do not operate independently because each virtual machine implements parts of a larger application.